using UnityEngine;

public class InputContrl : MonoSingleton<InputContrl>
{
	public static float Horizontal { get; private set; }

	public static float Vertical { get; private set; }

	public FloatingJoystick _FloatingJoystick { get; set; }

	public void F_IsOK()
	{
	}

	private void Start()
	{
		_FloatingJoystick = GameObject.FindGameObjectWithTag("虚拟摇杆")?.GetComponent<FloatingJoystick>();
	}

	private void Update()
	{
		if (_FloatingJoystick != null)
		{
			Horizontal = Input.GetAxisRaw("Horizontal") + _FloatingJoystick.Horizontal;
			Vertical = Input.GetAxisRaw("Vertical") + _FloatingJoystick.Vertical;
		}
		else
		{
			Horizontal = Input.GetAxisRaw("Horizontal");
			Vertical = Input.GetAxisRaw("Vertical");
		}
	}
}
